Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nodiscard to methods of redis::Database #1752

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

PragmaTwice
Copy link
Member

We add [[nodiscard]] attribute to methods of redis::Database to prevent missing handling of returned statuses.

Copy link
Member

@mapleFU mapleFU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems subclass of Database still suffer from not having [[nodiscard]]? Should we add thm later?

@PragmaTwice
Copy link
Member Author

PragmaTwice commented Sep 11, 2023

Seems subclass of Database still suffer from not having [[nodiscard]]? Should we add thm later?

I actually want to replace all of them from rocksdb::Status to our Status or StatusOr, then we can just have implicit [[nodiscard]]s instead of adding them to all functions.

However, it requires additional effort, so I have not yet begun.

@torwig
Copy link
Contributor

torwig commented Sep 11, 2023

@PragmaTwice It is a great idea to replace rocksdb::Status with Status/StatusOr in the Database class.

@PragmaTwice PragmaTwice merged commit 2ecaef2 into apache:unstable Sep 11, 2023
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants